#ifndef NF_SOCS_MULTICAST_H
#define NF_SOCS_MULTICAST_H
#include <linux/inetdevice.h>
#include "socs/comm/types.h"

#define SPORT 55535
#define DPORT 55535

struct multicast_info {
	int family;
	char ifname[IFNAMSIZ];
	struct socket *sock;
	union {
		struct in_addr addr4;
		struct in6_addr addr6;
	} multicast_addr;
	union {
		struct in_addr addr4;
		struct in6_addr addr6;
	} local_addr;
};

int multicast_init(void);
void multicast_destroy(void);
struct multicast_info *socs_mul_get(void);
int multicast_send(struct hello_packet *hello);
void socs_mul_localnode_down(const char *ifname);
void socs_mul_localnode_up(const char *iframe);

#endif
